package com.jzo2o.customer.controller.operation;

import com.jzo2o.common.model.PageResult;
import com.jzo2o.customer.model.dto.request.AgencyCertificationAuditPageQueryReqDTO;
import com.jzo2o.customer.model.dto.response.AgencyCertificationAuditResDTO;
import com.jzo2o.customer.service.AgencyCertificationAuditService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/operation/agency-certification-audit")
public class AgencyCertificayionAuditController {
    @Autowired
    private AgencyCertificationAuditService agencyCertificationAuditService;

    @GetMapping("/page")
    public PageResult<AgencyCertificationAuditResDTO> pageQuery(AgencyCertificationAuditPageQueryReqDTO agencyCertificationAuditPageQueryReqDTO) {
        return agencyCertificationAuditService.pageQuery(agencyCertificationAuditPageQueryReqDTO);
    }

    @PutMapping("/audit/{id}")
    public void audit(@PathVariable("id")Long id, Integer certificationStatus, String rejectReason) {
        agencyCertificationAuditService.audit(id, certificationStatus, rejectReason);
    }

}
